package com.maiji.cloud.entities.login;

import com.baomidou.mybatisplus.annotations.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.util.Date;

@NoArgsConstructor
@Data
@Accessors(chain=true)
@Table(name = "upload_record")
public class UploadRecord {

    @TableId()
    @Column(name = "uu_id", type = MySqlTypeConstant.VARCHAR, length = 50, isKey = true)
    private String uuId;

    @Column(name = "belong_id", type = MySqlTypeConstant.VARCHAR, length = 50)
    private String belongId;  //文件所属Id

     @Column(name = "bucket_name", type = MySqlTypeConstant.VARCHAR, length = 50)
    private String bucketName;  // oss

     @Column(name = "file_name", type = MySqlTypeConstant.VARCHAR, length = 100)
    private String fileName;  // 上传文件名

    @Column(name = "width", type = MySqlTypeConstant.INT, length = 2)
    private  Integer width; //图片宽度

    @Column(name = "height", type = MySqlTypeConstant.INT, length = 2)
    private  Integer height; //图片高度

    @Column(name = "url", type = MySqlTypeConstant.VARCHAR, length = 256)
    private String url;  // 文件存放地址

    @Column(name = "video_cover",type = MySqlTypeConstant.VARCHAR, length = 256)
    private String videoCover;//视频封面

    @Column(name = "no", type = MySqlTypeConstant.INT, length = 1)
    private Integer no; // 图片排列序号，0 - 99

    @Column(name = "upload_user_id", type = MySqlTypeConstant.VARCHAR, length = 50)
    private String uploadUserId;  // 上传用户uuid

    @Column(name = "upload_time", type = MySqlTypeConstant.DATETIME)
    private Date uploadTime ;  //上传时间

    @Column(name = "is_main", type = MySqlTypeConstant.INT, length = 1, defaultValue = "0")
    private Integer isMain; // 是否为主图，1-是，0-否

    @Column(name = "is_del", type = MySqlTypeConstant.INT, length = 1, defaultValue = "0")
    private Integer isDel; // 是否物理删除文件，1-已删除，0-未删除

}


